# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=jondobrowser
pkgver=0.12
pkgrel=2
_language='en-US'
pkgdesc='Firefox tweaked to work with jondo (anonymous browsing) (english version)'
url='https://anonymous-proxy-servers.net/en/jondobrowser.html'
arch=('x86_64')
license=('GPL')
depends=('java-environment')
optdepends=('zenity: simple dialog boxes'
      'kdialog: KDE dialog boxes'
      'notify-send: Gnome dialog boxes'
      'jondo: connection to jondo proxy cascades, gui version'
      'jondoconsole: connection to jondo proxy cascades, cli version')
install="jondobrowser.install"
source=("https://anonymous-proxy-servers.net/en/downloads/JonDoBrowser-$pkgver-linux-$CARCH-$_language.tar.xz"
        "https://anonymous-proxy-servers.net/en/downloads/JonDoBrowser-$pkgver-linux-$CARCH-$_language.tar.xz.asc"
        "jondobrowser.desktop")
sha256sums=('d9914af5b01e2f4d3ebfda1ad94ecdafdb9292484eb0fa27dcd1223c35b9a34f'
            'SKIP'
            'b7bbf376fd760e85102649166ed8710cceab88cf73b0425b67cb33be34d57749')
if [[ "$CARCH" == 'x86_64' ]]; then
  unset sha256sums
  sha256sums+=('1724710526cd97df9a2aac2677e3edd202a0f8bb5ad1169589519ebd8855b0c1'
              'SKIP'
              'b7bbf376fd760e85102649166ed8710cceab88cf73b0425b67cb33be34d57749')
fi

prepare() {
  cd JonDoBrowser

  sed -i 's|\./|/opt/JonDoBrowser/|' start-jondobrowser.sh
}

package() {
  cd JonDoBrowser

  install -dm 755  "$pkgdir/opt/JonDoBrowser"

  install -Dm 755 start-jondobrowser.sh "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 CHANGELOG "$pkgdir/usr/share/doc/$pkgname/CHANGELOG"
  install -Dm 644 ../jondobrowser.desktop "$pkgdir/usr/share/applications/jondobrowser.desktop"

  cp -r App "$pkgdir/opt/JonDoBrowser/"
  cp -r Data "$pkgdir/opt/JonDoBrowser"
}

